import pandas as pd
from pyecharts.charts import  Line
from pyecharts import  options as opts
from pyecharts.options import InitOpts,TitleOpts,LegendOpts,ToolboxOpts,VisualMapOpts,AxisOpts

data=pd.read_excel("副本Problem_C_Data_Wordle.xlsx")
num=list(data["num"])#每日报告数量
date=list(data["date"])#日期
hard=list(data["hard"])#每日困难报告数量
month=list(data["month"])#月份
data=list(data["data"])#每月报告数量
percent=list(data["percent"])

list=[list(z)for z in zip (num,hard,month,data,percent)]


line1=Line(init_opts=InitOpts(width="1500px",height="600px",theme="white",))

line1.add_xaxis(date)
line1.add_yaxis("困难提交占比",percent)
line1.set_global_opts(
    title_opts=TitleOpts("The number of reported results varies over time", pos_left="end", pos_top="1%"),
    legend_opts=LegendOpts(is_show=True),
    toolbox_opts=ToolboxOpts(is_show=True),
    visualmap_opts=VisualMapOpts(is_show=True,max_=1)
)


line1.render("按难度对词汇分类")


